import request from '@/utils/request'

// 查询客房订单列表
export function listRoomOrder(query) {
  return request({
    url: '/system/roomOrder/list',
    method: 'get',
    params: query
  })
}

// 查询客房订单详细
export function getRoomOrder(id) {
  return request({
    url: '/system/roomOrder/' + id,
    method: 'get'
  })
}

// 新增客房订单
export function addRoomOrder(data) {
  return request({
    url: '/system/roomOrder',
    method: 'post',
    data: data
  })
}
// 审核客房订单
export function audit(id) {
  return request({
    url: '/system/roomOrder/audit/' + id,
    method: 'put',
  })
}
// 修改客房订单
export function updateRoomOrder(data) {
  return request({
    url: '/system/roomOrder',
    method: 'put',
    data: data
  })
}

// 删除客房订单
export function delRoomOrder(id) {
  return request({
    url: '/system/roomOrder/' + id,
    method: 'delete'
  })
}
// 查询空闲客房信息列表
export function listFreeRoom(live,leave,orderId) {
  return request({
    url: '/system/room/all',
    method: 'get',
    params: {
      liveTime:live,
      leaveTime:leave,
      orderId:orderId
    }
  })
}
